package com.example.demo.controller;

import lombok.AllArgsConstructor;
import lombok.Data;

public abstract class BaseController {

    public <T> Response<T> success(T data) {
        return new Response<>(data,200,"请求成功");
    }

    @Data
    @AllArgsConstructor
    class Response<T> {
        private T data;
        private int code;
        private String message;
    }
}
